package com.xdemo.manager;

import java.util.TimerTask;

import com.xdemo.msg.ScheduleMessage;
import com.xdemo.processor.IProcessor;

public class ScheduleTask extends TimerTask {
	
	private ScheduleMessage message;
	
	private IProcessor<Integer> processor;
	
	public ScheduleTask(IProcessor<Integer> processor,ScheduleMessage message) {
		this.processor = processor;
		this.message = message;
	}

	@Override
	public void run() {
		processor.execute(message);
	}

}
